<template>
  <div>
    <table border="1">
      <tr>
        <td>年级</td>
        <td>课程</td>
      </tr>
      <tr v-for="i in list">
        <td>{{i.name}}</td>
        <td>
          <table>
            <tr>
              <td v-for="j in i.course">{{j.name}}</td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  name: "cla",
  data(){
    return{
      list:{}
    }
  },
  methods:{
    get(){
      this.$axios.get('users/showCourse/')
        .then(res=>{
          if(res.data.code==200){
            this.list = res.data.list
          }
        })
    }
  },
  mounted() {
    this.get()
  }
}
</script>

<style scoped>

</style>

